#import "UITextField+ZQPlaceholder.h"
#import <objc/message.h>
@implementation UITextField (ZQPlaceholder)
+ (void)load
{
    Method placeholderColor = class_getInstanceMethod(self, @selector(setPlaceholder:));
    Method ZQ_PlaceholderColor = class_getInstanceMethod(self, @selector(setZQ_PlaceholderColor:));
    method_exchangeImplementations(placeholderColor, ZQ_PlaceholderColor);
}
- (void)setPlaceholderColor:(UIColor *)placeholderColor
{
    objc_setAssociatedObject(self, @"placeholderColor", placeholderColor, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
    UILabel *placeholderLabel = [self valueForKey:@"placeholderLabel"];
    placeholderLabel.textColor = placeholderColor;
}
- (UIColor *)placeholderColor
{
    return objc_getAssociatedObject(self, @"placeholderColor");
}
- (void)setZQ_PlaceholderColor:(NSString *)placeholder
{
    [self setZQ_PlaceholderColor:placeholder];
    self.placeholderColor = self.placeholderColor;
}
@end
